﻿// Decompiled with JetBrains decompiler
// Type: MCM.Abstractions.Wrapper.BasePropertyDefinitionWrapper
// Assembly: MCMv5, Version=5.10.2.0, Culture=neutral, PublicKeyToken=null
// MVID: 7AB326B9-B2B4-41C2-9177-68E944071101
// Assembly location: D:\steam\steamapps\workshop\content\261550\2859238197\bin\Win64_Shipping_Client\MCMv5.dll

using System;

#nullable enable
namespace MCM.Abstractions.Wrapper
{
  public abstract class BasePropertyDefinitionWrapper : IPropertyDefinitionBase
  {
    public string DisplayName { get; }

    public int Order { get; }

    public bool RequireRestart { get; }

    public string HintText { get; }

    protected BasePropertyDefinitionWrapper(object @object)
    {
      Type type = @object.GetType();
      if (!(type.GetProperty(nameof (DisplayName))?.GetValue(@object) is string str1))
        str1 = "ERROR";
      this.DisplayName = str1;
      this.Order = (type.GetProperty(nameof (Order))?.GetValue(@object) as int?).GetValueOrDefault(-1);
      this.RequireRestart = (type.GetProperty(nameof (RequireRestart))?.GetValue(@object) as bool?).GetValueOrDefault(true);
      if (!(type.GetProperty(nameof (HintText))?.GetValue(@object) is string str2))
        str2 = "ERROR";
      this.HintText = str2;
    }
  }
}
